home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Interfaces / AIncludes / HyperXCmd.a < prev    next >
Encoding:
Text File  |  1996-01-24  |  5.5 KB  |  166 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        HyperXCmd.a
  3. ;
  4. ;    Contains:    Interfaces for HyperCard XCMD's
  5. ;
  6. ;    Version:    Technology:    HyperCard 2.3
  7. ;                Package:    Universal Interfaces 2.2 in “MPW” on ETO #20
  8. ;
  9. ;    Copyright:    © 1984-1995 by Apple Computer, Inc.
  10. ;                All rights reserved.
  11. ;
  12. ;    Bugs?:        If you find a problem with this file, use the Apple Bug Reporter
  13. ;                stack.  Include the file and version information (from above)
  14. ;                in the problem description and send to:
  15. ;                    Internet:    apple.bugs@applelink.apple.com
  16. ;                    AppleLink:    APPLE.BUGS
  17. ;
  18. ;
  19.  
  20.     IF &TYPE('__HYPERXCMD__') = 'UNDEFINED' THEN
  21. __HYPERXCMD__ SET 1
  22.  
  23.  
  24.     IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
  25.     include 'Types.a'
  26.     ENDIF
  27. ;        include 'ConditionalMacros.a'                                ;
  28.  
  29.     IF &TYPE('__EVENTS__') = 'UNDEFINED' THEN
  30.     include 'Events.a'
  31.     ENDIF
  32. ;        include 'Quickdraw.a'                                        ;
  33. ;            include 'MixedMode.a'                                    ;
  34. ;            include 'QuickdrawText.a'                                ;
  35. ;        include 'OSUtils.a'                                        ;
  36. ;            include 'Memory.a'                                        ;
  37. ;            include 'Patches.a'                                    ;
  38.  
  39.     IF &TYPE('__TEXTEDIT__') = 'UNDEFINED' THEN
  40.     include 'TextEdit.a'
  41.     ENDIF
  42.  
  43.     IF &TYPE('__MENUS__') = 'UNDEFINED' THEN
  44.     include 'Menus.a'
  45.     ENDIF
  46.  
  47.     IF &TYPE('__STANDARDFILE__') = 'UNDEFINED' THEN
  48.     include 'StandardFile.a'
  49.     ENDIF
  50. ;        include 'Dialogs.a'                                        ;
  51. ;            include 'Errors.a'                                        ;
  52. ;            include 'Controls.a'                                    ;
  53. ;            include 'Windows.a'                                    ;
  54. ;        include 'Files.a'                                            ;
  55. ;            include 'Finder.a'                                        ;
  56. ; result codes 
  57.  
  58. xresSucc                        EQU        0
  59. xresFail                        EQU        1
  60. xresNotImp                        EQU        2
  61.  
  62. ; XCMDBlock constants for event.what... 
  63. xOpenEvt                        EQU        1000                ; the first event after you are created 
  64. xCloseEvt                        EQU        1001                ; your window is being forced close (Quit?) 
  65. xGiveUpEditEvt                    EQU        1002                ; you are losing Edit... 
  66. xGiveUpSoundEvt                    EQU        1003                ; you are losing the sound channel... 
  67. xHidePalettesEvt                EQU        1004                ; someone called HideHCPalettes 
  68. xShowPalettesEvt                EQU        1005                ; someone called ShowHCPalettes 
  69. xEditUndo                        EQU        1100                ; Edit——Undo 
  70. xEditCut                        EQU        1102                ; Edit——Cut 
  71. xEditCopy                        EQU        1103                ; Edit——Copy 
  72. xEditPaste                        EQU        1104                ; Edit——Paste 
  73. xEditClear                        EQU        1105                ; Edit——Clear 
  74. xSendEvt                        EQU        1200                ; script has sent you a message (text) 
  75. xSetPropEvt                        EQU        1201                ; set a window property 
  76. xGetPropEvt                        EQU        1202                ; get a window property 
  77. xCursorWithin                    EQU        1300                ; cursor is within the window 
  78. xMenuEvt                        EQU        1400                ; user has selected an item in your menu 
  79. xMBarClickedEvt                    EQU        1401                ; a menu is about to be shown--update if needed 
  80. xShowWatchInfoEvt                EQU        1501                ; for variable and message watchers 
  81. xScriptErrorEvt                    EQU        1502                ; place the insertion point 
  82. xDebugErrorEvt                    EQU        1503                ; user clicked "Debug" at a complaint 
  83. xDebugStepEvt                    EQU        1504                ; hilite the line 
  84. xDebugTraceEvt                    EQU        1505                ; same as step but tracing 
  85. xDebugFinishedEvt                EQU        1506                ; script ended 
  86.  
  87. paletteProc                        EQU        2048                ; Windoid with grow box 
  88. palNoGrowProc                    EQU        2052                ; standard Windoid defproc 
  89. palZoomProc                        EQU        2056                ; Windoid with zoom and grow 
  90. palZoomNoGrow                    EQU        2060                ; Windoid with zoom and no grow 
  91. hasZoom                            EQU        8
  92. hasTallTBar                        EQU        2
  93. toggleHilite                    EQU        1
  94.  
  95. ; paramCount is set to these constants when first calling special XThings 
  96. xMessageWatcherID                EQU        -2
  97. xVariableWatcherID                EQU        -3
  98. xScriptEditorID                    EQU        -4
  99. xDebuggerID                        EQU        -5
  100.  
  101. ; XTalkObjectPtr->objectKind values 
  102. stackObj                        EQU        1
  103. bkgndObj                        EQU        2
  104. cardObj                            EQU        3
  105. fieldObj                        EQU        4
  106. buttonObj                        EQU        5
  107.  
  108. ; selectors for ShowHCAlert's dialogs (shown as buttonID:buttonText) 
  109. errorDlgID                        EQU        1                    ; 1:OK (default) 
  110. confirmDlgID                    EQU        2                    ; 1:OK (default) and 2:Cancel 
  111. confirmDelDlgID                    EQU        3                    ; 1:Cancel (default) and 2:Delete 
  112. yesNoCancelDlgID                EQU        4                    ; 1:Yes (default), 2:Cancel, and 3:No 
  113.  
  114. ; type definitions 
  115. XCmdBlock                 RECORD    0
  116. paramCount                 ds.w   1        ; offset: $0 (0)        ; If = -1 then new use for XWindoids 
  117. params                     ds.l   16        ; offset: $2 (2)
  118. returnValue                 ds.l   1        ; offset: $42 (66)
  119. passFlag                 ds.b   1        ; offset: $46 (70)
  120. filler1                     ds.b   1        ; offset: $47 (71)
  121. entryPoint                 ds.l   1        ; offset: $48 (72)        ; to call back to HyperCard 
  122. request                     ds.w   1        ; offset: $4C (76)
  123. result                     ds.w   1        ; offset: $4E (78)
  124. inArgs                     ds.l   8        ; offset: $50 (80)
  125. outArgs                     ds.l   4        ; offset: $70 (112)
  126. sizeof                     EQU *            ; size:   $80 (128)
  127.                         ENDR
  128.  
  129. ; typedef struct XCmdBlock     XCmdBlock
  130. ; typedef XCmdBlock         *XCmdPtr
  131. XWEventInfo             RECORD    0
  132. event                     ds     EventRecord ; offset: $0 (0)
  133. eventWindow                 ds.l   1        ; offset: $10 (16)
  134. eventParams                 ds.l   9        ; offset: $14 (20)
  135. eventResult                 ds.l   1        ; offset: $38 (56)
  136. sizeof                     EQU *            ; size:   $3C (60)
  137.                         ENDR
  138.  
  139. ; typedef struct XWEventInfo  XWEventInfo
  140. ; typedef XWEventInfo         *XWEventInfoPtr
  141. XTalkObject             RECORD    0
  142. objectKind                 ds.w   1        ; offset: $0 (0)        ; stack, bkgnd, card, field, or button 
  143. stackNum                 ds.l   1        ; offset: $2 (2)        ; reference number of the source stack 
  144. bkgndID                     ds.l   1        ; offset: $6 (6)
  145. cardID                     ds.l   1        ; offset: $A (10)
  146. buttonID                 ds.l   1        ; offset: $E (14)
  147. fieldID                     ds.l   1        ; offset: $12 (18)
  148. sizeof                     EQU *            ; size:   $16 (22)
  149.                         ENDR
  150.  
  151. ; typedef struct XTalkObject  XTalkObject
  152. ; typedef XTalkObject         *XTalkObjectPtr
  153. ; maximum number of checkpoints in a script 
  154.  
  155. maxCachedChecks                    EQU        16
  156.  
  157. CheckPts                 RECORD    0
  158. checks                     ds.w   16        ; offset: $0 (0)
  159. sizeof                     EQU *            ; size:   $20 (32)
  160.                         ENDR
  161.  
  162. ; typedef struct CheckPts     CheckPts
  163. ; typedef CheckPts             *CheckPtPtr
  164. ; typedef CheckPtPtr         *CheckPtHandle
  165.     ENDIF ; __HYPERXCMD__
  166.